﻿using UnityEngine;

public class FinalSwordDamage:MonoBehaviour
{
    public void OnAttack()
    {
        //获取玩家攻击
        int damage = GameManager.Instance.player.GetPlayerDamage();
        //获取敌人
        Enemy enemy = GameManager.Instance.player.GetComponent<PlayerHurtObj>().currAttackEnemy;
        if(enemy!=null)
        {
            //攻击敌人
            enemy.BeHurt(damage,true);
        }
    }
}
